package com.lxs.demo;

import java.util.concurrent.TimeUnit;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoService2 implements Service2Client{
	
	@Value("${spring.application.name}")
	private String servicename;
	
	@Value("${server.port}")
	private String port;

	
	public String getInfo() {
		try {
			TimeUnit.MILLISECONDS.sleep(500);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return servicename+":"+port;
	}
}
